local MapTipPanel = require "View/Expedition/SubPanel/ExpeditionMapTipPanel"

---@class UIExpeditionMapView : UIBase
UIExpeditionMapView = UIBase.New(PanelResNames.UIExpeditionMapView)
local t = UIExpeditionMapView

function t.Init()
    UIBase.Init(t)
end

function t:OnCreate()
    self.ctrlClickMap = self:GetController("ctrlClickMap")
    self.timeText = self:GetChild("ResetTimeRemain")
    self.btnBack = self:GetChild("Backbutton")
    self.nameText = self:GetChild("Name")
    self.rewardItemList = self:GetList("RewardList")
    self.mapNameText = self:GetChild("Name")
    self.buffNameText = self:GetChild("BuffName")
    self.buffTipText = self:GetChild("BuffTips")
    self.buffIcon = self:GetChild("Bufficon")
    self.firstWardCtrl = self:GetController("FirstClear")
    self.btnInfo = self:GetChild("Tips")
    self.btnStart = self:GetChild("StartButton")
    self.resetAnim = self:GetTransition("reset")
    ---@type ExpeditionMapTipPanel
    self.mapTipPanel = self:CreateComponent(MapTipPanel,self:GetChild("MapTips"))
    self.btnBless = self:GetChild("BlessButton")
    self.btnHolyStone = self:GetChild("HolyStoneButton")
    self.btnHero = self:GetChild("HeroButton")
    self.btnShop = self:GetChild("LongJourneyShopButton")
    self.Text_Num1 = self:GetChild("Com_Privilege"):GetChild("Text_Num1")
    self.Text_Num2 = self:GetChild("Com_Privilege"):GetChild("Text_Num2")
    self.Graph_UI_ruchang_xyyz_1 = self:GetChild("Graph_UI_ruchang_xyyz_1");
    self.privilegeController = self:GetController("Privilege")
    self.ifMultipleCtrl = self:GetChild("n134"):GetController("ExtraReward");
    self.ticketIcon = self:GetChild("Com_Res")
    --self.ticketAddBtn = self.ticketIcon:GetChild("add")  --暂不支持购买
    self.ticketJumpBtn = self.ticketIcon:GetChild("btnJump")
    self.ticketJumpCtrl = self:GetController("showSource")
    self.ticketAddCtrl = self.ticketIcon:GetController("add")
    self.startWayCtrl = self:GetController("UseTicket")
    self.ticketCount = self.ticketIcon:GetChild("title")
    self.sourceUIobj = self:GetChild("UISourceMultiple");
    self.mainReward = self:GetChild("mainReward")

    self.nextRecoverTime = self:GetChild("Text_NextRecoverTime")
    self.fullRecoverTime = self:GetChild("Text_FullRecoverTime")
    self.btnFastClear = self:GetChild("Btn_FastClear")
    self.btnAddStrength = self:GetChild("Btn_Add")
    self.fastClearCost = self.btnFastClear:GetChild("Text_Stamina")
    self.StaminaTipCtrl = self:GetController("StaminaTips")
    self.DaliyClearCtrl = self:GetController("DaliyClear")
    self.btnStamina = self:GetChild("Btn_ Stamina")
    self.staminaCount = self.btnStamina:GetChild("title")
    self.btnLongJourneyHell = self:GetChild("Btn_Fun");
    self.btnLongJourneyHellRed = self.btnLongJourneyHell:GetChild("UIRedDots"):GetController("c1");


    self.isCreate = true
    self:RefreshExpIcon()
    self:SetDynamicList(self.rewardItemList,self.ItemRender)
    self:RegisterOnClick(self.btnInfo,self.ClickInfo)
    self:RegisterOnClick(self.btnBack,self.ClickClose)
    self:RegisterOnClick(self.btnStart,self.ClickStart)
    self:RegisterOnClick(self.btnBless,self.ClickBless)
    self:RegisterOnClick(self.btnHolyStone,self.ClickHolyStone)
    self:RegisterOnClick(self.btnHero,self.ClickHero)
    self:RegisterOnClick(self.btnShop,self.ClickShop)
    self:RegisterOnClick(self.ticketJumpBtn,self.ClickTicketJump)
    self:RegisterOnClick(self.btnStamina,self.ShowStrengthTimer)
    self:RegisterOnClick(self.btnAddStrength,self.ShowAddStrength)
    self:RegisterOnClick(self.btnFastClear,self.ClickStrengthSweep)
    self:RegisterOnClick(self.btnLongJourneyHell,self.ClickLongJourneyHell)
    self:RegisterEvent(Config.EventType.Fresh_Bag,self.RefreshTicket);
    self:RegisterEvent(Config.EventType.Fresh_ExpeditionStrength,self.FreshExpeditionStrength)
    self:RegisterOnClick(self:GetChild("n135"),function()
        local cfg = dataTable.getDataTableById("t_expeditionchapter", self.ctrlClickMap.selectedIndex)
        local wards = logicMgr.ItemManager.ParseRewards(cfg["f_FirstReward"])
        logicMgr.UIShowManager.ShowRewardPreview(wards)
    end)
    self:RegisterOnClick(self.btnHero,self.ClickHero)
    self:RegisterEvent(Config.EventType.ExpeditionDataRefresh,self.Refresh)
    self:RegisterEvent(Config.EventType.Fresh_LongJourneyHellInfo,self.RefreshHellRed);
    self.btnList = {}
    self.btnWardCtrl = {}
    self._xyyzPlayTime = 2000  -- 旋云远征入场动画持续时间（毫秒）
    for i = 1,7 do
        local btn = self:GetChild("Map"..i)
        table.insert(self.btnList,btn)
        table.insert(self.btnWardCtrl,btn:GetController("FirstClear"))
        self:RegisterOnClick(btn,self.ClickMap,self,i)
        self:RegisterOnClick(self:GetChild("Btn_FirstClearReward0"..i),function()
            if self.btnWardCtrl[i].selectedIndex == 1 then
                local cfg = dataTable.getDataTableById("t_expeditionchapter", i)
                local wards = logicMgr.ItemManager.ParseRewards(cfg["f_FirstReward"])
                logicMgr.UIShowManager.ShowRewardPreview(wards)
            end
        end)
    end
    self.rewardCacheList = {}
    self.rewardDataList = nil
    if logicMgr.ExpeditionMgr.showExpeditionImmediate then
        ExpeditionHandler.closeAllUI()
        logicMgr.ExpeditionMgr.showExpeditionImmediate = false
        local time = logicMgr.ExpeditionMgr.endTime-HelperFunc.GetServerTime()
        if time > 0 or logicMgr.ExpeditionMgr.endTime == 0  then
            ExpeditionHandler.ReqSynExpedition(true)
        end
    end
    logicMgr.FuncOpenManager.refreshMainReward(self.mainReward,Config.FuncOpenType.expedition)
end
function t:Refresh()
    self:RefreshBuff()
    self:RefreshBtn()
end
function t:RefreshHellRed()
    if logicMgr.LongJourneyHellManager.LongJourneyHellRedState() then
        self.btnLongJourneyHellRed.selectedIndex = 2;
    else
        self.btnLongJourneyHellRed.selectedIndex = 0;
    end
end
function t:RefreshExpIcon()
    local heroExp = self:GetChild("n134/btn1")
    self:RegisterOnClick(heroExp,self.ClickHeroExpIcon)
    local icon2 = self:GetChild("n134/btn2")
    self:RegisterOnClick(icon2,self.ClickMarkIcon)
    local icon3 = self:GetChild("n134/btn3")
    self:RegisterOnClick(icon3,self.ClickHExpeditionPointIcon)
    --是否开启了双倍远征活动
    if not ActiveManager.IsActiveEnd(10301) then
        self.ifMultipleCtrl.selectedIndex = 1
    else
        self.ifMultipleCtrl.selectedIndex = 0
    end
end
function t:RefreshTicket()
    local ticketNum = logicMgr.ItemManager.getItemCountbyModelId(CurrencyEnum.ExpeditionTicket);
    local singleItemConfig = logicMgr.ItemManager.getItemConstDatabyModelId(CurrencyEnum.ExpeditionTicket);
    self.ticketIcon.icon = "ui://ItemAtlas/" .. singleItemConfig["icon"];
    self.ticketCount.text = tostring(ticketNum);
end
function t:RefreshRecoverTime()
    if logicMgr.ExpeditionMgr.GetNextRefreshEnergyTime() > 0 then
        local countTime = logicMgr.ExpeditionMgr.GetNextRefreshEnergyTime() - HelperFunc.GetServerTime()
        if countTime > 0 then
            if self.nextRefreshTimer then
                utimer.remove(self.nextRefreshTimer)
                self.nextRefreshTimer = nil
            end
            self.nextRefreshTimer =  utimer.timeCall(function()
                countTime = countTime - 1
                if countTime <= 0 then
                    countTime = 0
                    utimer.remove(self.nextRefreshTimer)
                    self.nextRefreshTimer = nil
                    logicMgr.ExpeditionMgr.RecoverStrength()
                    self:RefreshStaminaCount()
                    self:RefreshRecoverTime()
                end
                self.nextRecoverTime.text = HelperFunc.GetTimeStr(countTime)
            end, 1000, -1)
        end
    else
        if self.nextRefreshTimer then
            utimer.remove(self.nextRefreshTimer)
            self.nextRefreshTimer = nil
        end
        self.nextRecoverTime.text = HelperFunc.GetTimeStr(0)
    end

    if logicMgr.ExpeditionMgr.GetEnergyFullTime() > 0 then
        local countTime = logicMgr.ExpeditionMgr.GetEnergyFullTime() - HelperFunc.GetServerTime()
        if countTime > 0 then
            if self.fullTimer then
                utimer.remove(self.fullTimer)
                self.fullTimer = nil
            end
            self.fullTimer =  utimer.timeCall(function()
                countTime = countTime - 1
                if countTime <= 0 then
                    countTime = 0
                    utimer.remove(self.fullTimer)
                    self.fullTimer = nil
                end
                self.fullRecoverTime.text = HelperFunc.GetTimeStr(countTime)
            end, 1000, -1)
        end
    else
        if self.fullTimer then
            utimer.remove(self.fullTimer)
            self.fullTimer = nil
        end
        self.fullRecoverTime.text = HelperFunc.GetTimeStr(0)
    end
end

function t:RefreshStaminaCount()
    self.fastClearCost.text = G.dataTable["t_global"][tostring(595)]["f_string_value"][3]
    local curStrength = logicMgr.ExpeditionMgr.strength
    local maxStrength = logicMgr.ExpeditionMgr.GetFullEnergy()
    self.staminaCount.text = curStrength.."/"..maxStrength
end

function t:OnEnable()
    UIHeadMenu.isNeedShowMask(true);

    resMgr:LoadModelPrefab("UIEff/UI_ruchang_xyyz_in", function(prefab)
        if not self.isCreate then
            return
        end
        if prefab then
            if self.effDrawWrapper1 == nil then
                self.effDrawWrapper1 = GoWrapper.New();
            end
            if self.effFire1Obj ~= nil then
                destroyImmediate(self.effFire1Obj);
                self.effFire1Obj = nil
            end
            self.effFire1Obj = newObject(prefab)
            self.effDrawWrapper1:SetWrapTarget(self.effFire1Obj,false)
            Util.Lua_SetLocalRotationXYZ(self.effFire1Obj.transform, 0, 0, 0);
            self.Graph_UI_ruchang_xyyz_1:SetNativeObject(self.effDrawWrapper1)
        end
    end)
    self.effTimer = utimer.timeCall(function ()
        UIHeadMenu.isNeedShowMask();
        if not HelperFunc.IsNull(self.effFire1Obj) then
            destroyImmediate(self.effFire1Obj);
            self.effFire1Obj = nil
        end
    end, self._xyyzPlayTime, 1);

    AudioManager.SetSwitch("battle_steps", "arr")
    FightManager.SetBGMSwitchByBattleType(EnumConst.FightTypeConst.Expedition)
    AudioManager.SetSwitch("Battle_SwitchGroup","expedition")
    self.ctrlClickMap.selectedIndex = 0
    self:RefreshBtn()
    self:RefreshStartWay()
    self:TimeCall(self.UpdateTime,1000,-1)
    self:UpdateTime()
    self:RefreshTicket()
    self:RefreshRecoverTime()
    self:RefreshStaminaCount()
    self:RefreshHellRed()
end


function t:OnDisable()
    UIHeadMenu.isNeedShowMask();
    self:RemoveTimeCall(self.UpdateTime)
    self:RemoveTimeCall(self.nextRefreshTimer)
    self:RemoveTimeCall(self.fullTimer)
end
function t:OnDestroy()
    self.isCreate = false
    if self.effDrawWrapper1 then
        self.effDrawWrapper1:Dispose()
        self.effDrawWrapper1 = nil
    end
    if self.effTimer then
        utimer.remove(self.effTimer)
        self.effTimer = nil
    end
    if self.effFire1Obj ~= nil then
        destroyImmediate(self.effFire1Obj);
        self.effFire1Obj = nil
    end
    if self.nextRefreshTimer then
        utimer.remove(self.nextRefreshTimer)
        self.nextRefreshTimer = nil
    end
    if self.fullTimer then
        utimer.remove(self.fullTimer)
        self.fullTimer = nil
    end
end

function t:UpdateTime()
    if logicMgr.ExpeditionMgr.endTime == 0 then
        self.timeText.text = "00:00:00"
        return
    end
    local time = logicMgr.ExpeditionMgr.endTime-HelperFunc.GetServerTime()
    self.timeText.text = string.format(getLanguage("expedition_reset_time_tip"),HelperFunc.GetTimeStr(time))
    if time <= 0 then
        logicMgr.ExpeditionMgr.RefreshTimeFinished()
        self:UpdateTime()
        if logicMgr.ExpeditionMgr.resetCount >= 1 then
            ExpeditionHandler.ReqResetExpedition()
        end
    end
end

function t:GetRewardDataList(difficulty)
    local list = self.rewardCacheList[difficulty]
    if list then
        return list
    end
    local temp = {}
    --装备补上
    --[[for i = 1,12 do
        local drop = dataTable.getDataTableByMultiId("t_expeditionequipdrop",logicMgr.MapManager.getMapId(),i)
        if drop then
            temp[drop.f_EquipDrop] = 1
        end
    end]]
    local cfgs = logicMgr.ExpeditionMgr.GetStageCfg(difficulty)
    for k,v in pairs(cfgs) do
        for k2,v2 in pairs(v.f_Reward) do
            temp[v2[1]] = 1
        end
        if v.f_RewardParameter[1] ~= 0 then
            temp[6] = 1
        end
        if v.f_RewardParameter[3] ~= 0 then
            temp[3] = 1
        end
        if v.f_WeaponEnergy ~= "" then
            temp[CurrencyEnum.Stone13] = 1
        end
        if v.f_HolySite ~= "" then
            temp[CurrencyEnum.WomenGod] = 1
        end
        if v.f_IronBlock ~= "" then
            temp[200011] = 1
        end
        if v.f_EliteCred ~= "" then
            temp[18] = 1
        end
        if v.f_WeaponEnergy2 ~= "" then
            temp[32] = 1
        end
        if v.f_SoulCrystal ~= "" then
            temp[200026] = 1
        end
    end
    list = {}
    local isPass = logicMgr.ExpeditionMgr.passRegionToday[difficulty]
    for k,v in pairs(temp) do
        if k == CurrencyEnum.GodMark then
            if not isPass then
                table.insert(list,{itemModelId = k})
            end
        else
            table.insert(list,{itemModelId = k})
        end
    end
    self.rewardCacheList[difficulty] = list
    return list
end
function t:RefreshStartWay()
    self.startWayCtrl:SetSelectedIndex( 0 )
    --if logicMgr.ExpeditionMgr.IsCompletedFirst() and logicMgr.ExpeditionMgr.GetResetType() == 3 then  --使用远征券重置的
    if logicMgr.ExpeditionMgr.GetResetType() == 3 then
        self.DaliyClearCtrl:SetSelectedIndex( 1 )
    end
end
function t:RefreshBtn()
    local cfg = dataTable.getDataTable("t_expeditionchapter")
    --local mapId = logicMgr.MapManager.getMapId()
    for k,v in pairs(self.btnList) do
        local mapInfo = logicMgr.ExpeditionMgr.GetMapInfo(k)
        if cfg[k] == nil or mapInfo == nil then
            v.visible = false
        else
            v.visible = true
            v:GetChild("name").text = getLanguage(cfg[k].f_MapName)
            --v:GetController("star").selectedIndex = 0
            v:GetChild("Mapicon").url = "ui://UILongJourney/"..cfg[k].f_MapIcon
            local ctrlLock = v:GetController("lock")
            local unlockText = v:GetChild("Text_unlokc")
            --if  mapId < cfg[k].f_UnlockingLv then
            local _flag, _tips = logicMgr.CostManager.isOpenItem(cfg[k])
            if not _flag then
                --local stageCfg = dataTable.getDataTableByStringId("t_stage",cfg[k].f_UnlockingLv)
                --local str = stageCfg.f_ChapterId .. "-" .. stageCfg.f_StageNum;
                --unlockText.text = string.format(getLanguage("expedition_map_lock"),str)
                unlockText.text = _tips;
                ctrlLock.selectedIndex = 1
                v.touchable = false
            else
                ctrlLock.selectedIndex = 0
                v.touchable = true
            end
        end
        if logicMgr.ExpeditionMgr.FirstWardHasGet(k) then
           self.btnWardCtrl[k].selectedIndex = 0
        else
            self.btnWardCtrl[k].selectedIndex = 1
        end
    end
    self.privilegeController.selectedIndex = 0;
    local passNum = logicMgr.ExpeditionMgr.GetPassNum();
    if passNum > 0 then
        self.privilegeController.selectedIndex = 1;
        self.Text_Num1.text = "+"..(passNum * 0.01).."%";
        self.Text_Num2.text = string.format(getLanguage("NobleRightDesc3"), passNum * 0.01);
    end
end
function t:RefreshBuff()
    if self.selectId == nil then
        return
    end
    local mapInfo = logicMgr.ExpeditionMgr.GetMapInfo(self.selectId)
    if mapInfo then 
        local cfg = dataTable.getDataTableByStringId("t_skill",mapInfo.buffId)
        if cfg then
            self.buffNameText.text = getLanguage(cfg.f_SkillName)
            self.buffTipText.text = getLanguage(cfg.f_Desc)
            local scfg = SkillManager.getSkillInfoConfig(mapInfo.buffId)
            if scfg then
                self.buffIcon.url = EnumConst.AtlasPath.SkillAtlas..scfg.f_SkillIcon
            end
        else
            logError("找不到skill id:"..mapInfo.buffId)
        end
    end
end
function t:ItemRender(index,go)
    local data = self.rewardDataList[index]
    local item = logicMgr.CtrlManager.GetCtrl(PanelNames.Item)
    item.initData(go,data)
end
function t:ClickMap(id)
    self.btnWardCtrl[id].selectedIndex = 0
    self.selectId = id
    local mapInfo = logicMgr.ExpeditionMgr.GetMapInfo(id)
    if not mapInfo then
        logError("找不到mapInfo")
        return
    end
    self:RefreshBuff()
    if logicMgr.ExpeditionMgr.FirstWardHasGet(id) then
        self.firstWardCtrl.selectedIndex = 0
    else
        self.firstWardCtrl.selectedIndex = 1
    end
    self.nameText.text = getLanguage(dataTable.getDataTableById("t_expeditionchapter",id,"f_MapName"))
    self.rewardDataList = self:GetRewardDataList(mapInfo.difficulty)
    self.rewardItemList.numItems = #self.rewardDataList
    self.mapTipPanel:Refresh(id)
    self.isMapFinished = false
    self.timerId = utimer.delayCall(self.MapAnimFinished,1250,self)
end
function t:ClickInfo()
    logicMgr.UIShowManager.ShowCommonTips("expedition_info_title","expedition_info_des","FunctionStory304")
end

function t:ClickStart()
    if self.startWayCtrl.selectedIndex == 0 then
        ExpeditionHandler.ReqSelectRegion(self.selectId)
        --local des = string.format(getLanguage("expedition_enter_tip"),self.nameText.text)
        --local subDes = getLanguage("expedition_enter_sub_tip")
        --logicMgr.UIShowManager.ShowCommonConfirm(des,subDes,t.ClickStartSure,nil,self)
    elseif self.startWayCtrl.selectedIndex == 1 then  --使用远征券扫荡
        --判断是否首通
        if logicMgr.ExpeditionMgr.FirstWardHasGet(self.selectId) then
            ExpeditionHandler.ReqSelectRegion(self.selectId,1)
        else
            UISysTips.AddMsg("非首通关卡不能快速扫荡");
        end
    end
    -- TAManager.TrackByDictionary("expedition_click_start",{map_id =self.selectId })
end
function t:MapAnimFinished()
    self.isMapFinished = true
end
--[[function t:ClickStartSure()
    TAManager.TrackByDictionary("expedition_click_start",{map_id =self.selectId })
    ExpeditionHandler.ReqSelectRegion(self.selectId)
end]]
function t:ClickClose()
    if self.ctrlClickMap.selectedIndex > 0 then
        if self.isMapFinished then
            self.ctrlClickMap.selectedIndex = 0
            if logicMgr.ExpeditionMgr.FirstWardHasGet(self.selectId) then
                self.btnWardCtrl[self.selectId].selectedIndex = 0
            else
                self.btnWardCtrl[self.selectId].selectedIndex = 1
            end
        end
        return
    end
    closeUI(PanelNames.UIExpeditionMapView)
    showUI(PanelNames.UIHeadMenu)
    showUI(PanelNames.UIBottom)
    UIBottom.enterAdventure()
end
--女神祝福
function t:ClickBless()
    logicMgr.UIShowManager.ShowExpeditionCarPreview()
end
--神圣结晶
function t:ClickHolyStone()
    logicMgr.UIShowManager.ShowExpeditionHolyStone(nil, function ()
        self:ClickClose();
    end);
end
--英雄
function t:ClickHero()
    logicMgr.UIShowManager.ShowExpeditionHeroList()
end
--远征商店
function t:ClickShop()
    logicMgr.UIShowManager.ShowUIShop(EnumConst.ShopType.expeditionShop,nil,4)  -- 4 野外界面
end
function t:ClickTicketJump()
    self.ticketJumpCtrl.selectedIndex = 1
    self.showSourceList = {CurrencyEnum.ExpeditionTicket}
    self:UpdateSource();
end
function t:ShowStrengthTimer()
end
function t:ShowAddStrength()
    local itemId = logicMgr.ItemManager.getItemIdByModelId(200035)
    if itemId then
        local itemData = logicMgr.ItemManager.getItemData(itemId)
        showUI(PanelNames.UIBagItemInfo, itemData, 1,nil, false);
    else
        UISysTips.AddMsg(getLanguage("ErrorCode_220002"))
    end
end
function t:FreshExpeditionStrength()
    self:RefreshRecoverTime()
    self:RefreshStaminaCount()
end
function t:ClickStrengthSweep()
    local curStrength = logicMgr.ExpeditionMgr.strength
    local cfgInfo = G.dataTable["t_global"][tostring(595)]["f_string_value"]
    local strengthSweepCost = 0
    if cfgInfo and cfgInfo[3] and tonumber(cfgInfo[3]) > 0 then
        strengthSweepCost = tonumber(cfgInfo[3])
    end

    if logicMgr.ExpeditionMgr.FirstWardHasGet(self.selectId) then    --判断是否首通
        if curStrength and curStrength >= strengthSweepCost then     --判断体力值够不够
            local pop = CtrlManager.GetCtrl(PanelNames.UICommonPop);
            pop.Init("106", function(b)
                if b then
                    --logicMgr.ExpeditionMgr.SetResetType(3)
                    --ExpeditionHandler.ReqSelectRegion(self.selectId,1)
                    ExpeditionHandler.ReqExpeditionQuickSweep(self.selectId)
                end
            end, strengthSweepCost)
        else
            UISysTips.AddMsg(getLanguage("ErrorCode_220001"))
        end
    else
        UISysTips.AddMsg("非首通关卡不能快速扫荡");
    end
end

function t:ClickLongJourneyHell()
    if logicMgr.FuncOpenManager.isOpen(Config.FuncOpenType.LongJourneyHell,true,self.btnLongJourneyHell) then
        logicMgr.LongJourneyHellManager.getLongJourneyHellServerData();
    end
end

function t:UpdateSource()
    logicMgr.ItemManager.updateSourceUI(self.sourceUIobj, self.showSourceList, function ()
        self.ticketJumpCtrl.selectedIndex = 0;
    end, function ()
        self.ticketJumpCtrl.selectedIndex = 0;
        self:ClickClose();
    end );
end
function t:ClickHeroExpIcon()
    showUI(PanelNames.UIBagItemInfo, { itemModelId = CurrencyEnum.HeroExp });
end
function t:ClickHExpeditionPointIcon()
    showUI(PanelNames.UIBagItemInfo, { itemModelId = CurrencyEnum.ExpeditionPoint });
end
function t:ClickMarkIcon()
    showUI(PanelNames.UIBagItemInfo, { itemModelId = CurrencyEnum.GodMark });
end
return t